package cn.sciento.boot.api.customize.commons.vo;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.StringJoiner;

public class ApiCustomizeRule implements Serializable {
  private static final long serialVersionUID = -7443546256903127318L;
  
  public static final String CACHE_KEY = "hpfm:customize:rule";
  
  @ApiModelProperty("规则编码")
  private String ruleCode;
  
  @ApiModelProperty("规则名称")
  private String ruleName;
  
  @ApiModelProperty("租户ID,hpfm_tenant.tenant_id")
  private Long tenantId;
  
  @ApiModelProperty("规则类别编码，HPFM.CUSTOMIZE_RULE_TYPE")
  private String typeCode;
  
  @ApiModelProperty("规则类别对应的值")
  private String typeValue;
  
  @ApiModelProperty("规则位置，HPFM.CUSTOMIZE_RULE_POSITION")
  private String rulePosition;
  
  @ApiModelProperty("是否同步调用 1：同步；0异步；默认1；")
  private Integer syncFlag;
  
  @ApiModelProperty("是否启用。1启用，0未启用")
  private Integer enabledFlag;
  
  public ApiCustomizeRule() {}
  
  public ApiCustomizeRule(String ruleCode, String ruleName, Long tenantId, String typeCode, String typeValue, String rulePosition, Integer syncFlag, Integer enabledFlag) {
    this.ruleCode = ruleCode;
    this.ruleName = ruleName;
    this.tenantId = tenantId;
    this.typeCode = typeCode;
    this.typeValue = typeValue;
    this.rulePosition = rulePosition;
    this.syncFlag = syncFlag;
    this.enabledFlag = enabledFlag;
  }
  
  public String getRuleCode() {
    return this.ruleCode;
  }
  
  public ApiCustomizeRule setRuleCode(String ruleCode) {
    this.ruleCode = ruleCode;
    return this;
  }
  
  public String getRuleName() {
    return this.ruleName;
  }
  
  public ApiCustomizeRule setRuleName(String ruleName) {
    this.ruleName = ruleName;
    return this;
  }
  
  public Long getTenantId() {
    return this.tenantId;
  }
  
  public ApiCustomizeRule setTenantId(Long tenantId) {
    this.tenantId = tenantId;
    return this;
  }
  
  public String getTypeCode() {
    return this.typeCode;
  }
  
  public ApiCustomizeRule setTypeCode(String typeCode) {
    this.typeCode = typeCode;
    return this;
  }
  
  public String getTypeValue() {
    return this.typeValue;
  }
  
  public ApiCustomizeRule setTypeValue(String typeValue) {
    this.typeValue = typeValue;
    return this;
  }
  
  public String getRulePosition() {
    return this.rulePosition;
  }
  
  public ApiCustomizeRule setRulePosition(String rulePosition) {
    this.rulePosition = rulePosition;
    return this;
  }
  
  public Integer getSyncFlag() {
    return this.syncFlag;
  }
  
  public ApiCustomizeRule setSyncFlag(Integer syncFlag) {
    this.syncFlag = syncFlag;
    return this;
  }
  
  public Integer getEnabledFlag() {
    return this.enabledFlag;
  }
  
  public ApiCustomizeRule setEnabledFlag(Integer enabledFlag) {
    this.enabledFlag = enabledFlag;
    return this;
  }
  
  public String toString() {
    return (new StringJoiner(", ", ApiCustomizeRule.class.getSimpleName() + "[", "]"))
      .add("ruleCode='" + this.ruleCode + "'")
      .add("ruleName='" + this.ruleName + "'")
      .add("tenantId=" + this.tenantId)
      .add("typeCode='" + this.typeCode + "'")
      .add("typeValue='" + this.typeValue + "'")
      .add("rulePosition='" + this.rulePosition + "'")
      .add("syncFlag=" + this.syncFlag)
      .add("enabledFlag=" + this.enabledFlag)
      .toString();
  }
}
